package com.ruoyi.project.anquan.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.anquan.mapper.SecuritySgsjMapper;
import com.ruoyi.project.anquan.domain.SecuritySgsj;
import com.ruoyi.project.anquan.service.ISecuritySgsjService;

/**
 * 事故事件Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-05-11
 */
@Service
public class SecuritySgsjServiceImpl implements ISecuritySgsjService 
{
    @Autowired
    private SecuritySgsjMapper securitySgsjMapper;

    /**
     * 查询事故事件
     * 
     * @param sgsjId 事故事件ID
     * @return 事故事件
     */
    @Override
    public SecuritySgsj selectSecuritySgsjById(Long sgsjId)
    {
        return securitySgsjMapper.selectSecuritySgsjById(sgsjId);
    }

    /**
     * 查询事故事件列表
     * 
     * @param securitySgsj 事故事件
     * @return 事故事件
     */
    @Override
    public List<SecuritySgsj> selectSecuritySgsjList(SecuritySgsj securitySgsj)
    {
        return securitySgsjMapper.selectSecuritySgsjList(securitySgsj);
    }

    /**
     * 新增事故事件
     * 
     * @param securitySgsj 事故事件
     * @return 结果
     */
    @Override
    public int insertSecuritySgsj(SecuritySgsj securitySgsj)
    {
        return securitySgsjMapper.insertSecuritySgsj(securitySgsj);
    }

    /**
     * 修改事故事件
     * 
     * @param securitySgsj 事故事件
     * @return 结果
     */
    @Override
    public int updateSecuritySgsj(SecuritySgsj securitySgsj)
    {
        return securitySgsjMapper.updateSecuritySgsj(securitySgsj);
    }

    /**
     * 批量删除事故事件
     * 
     * @param sgsjIds 需要删除的事故事件ID
     * @return 结果
     */
    @Override
    public int deleteSecuritySgsjByIds(Long[] sgsjIds)
    {
        return securitySgsjMapper.deleteSecuritySgsjByIds(sgsjIds);
    }

    /**
     * 删除事故事件信息
     * 
     * @param sgsjId 事故事件ID
     * @return 结果
     */
    @Override
    public int deleteSecuritySgsjById(Long sgsjId)
    {
        return securitySgsjMapper.deleteSecuritySgsjById(sgsjId);
    }

	@Override
	public List<SecuritySgsj> statisticsByEventType() {
		// TODO Auto-generated method stub
		return securitySgsjMapper.statisticsByEventType();
	}
}
